package com.office.service.impl;

import com.office.bean.Depart;
import com.office.mapper.DepartMapper;
import com.office.service.DepartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DepartServiceImpl implements DepartService {

    @Autowired
    DepartMapper departMapper;

    @Override
    public int addDepart(Depart depart) {
        return departMapper.addDepart(depart);
    }

    @Override
    public long findTotalcount() {
        return departMapper.findTotalcount();
    }

    @Override
    public List<Depart> findDepartsByPage(Map<String, Object> map) {
        return departMapper.findDepartsByPage(map);
    }

    @Override
    public boolean deleteById(int id) {
        return departMapper.deleteById(id);
    }

    @Override
    public Depart findDepById(int id) {
        return departMapper.findDepById(id);
    }

    @Override
    public int update(Depart depart) {
        return departMapper.update(depart);
    }

    @Override
    public List<Depart> findDepart() {
        return departMapper.findDepart();
    }

    @Override
    public long findEmpCount(int did) {
        return departMapper.findEmpCount(did);
    }


}
